package com.easy.frame.base.api.pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 分页接口参数类
 *
 * @author zzf
 * @date 2020/7/3 8:41
 */
@Getter
@Setter
@ToString
public class PageDTO<P> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "页号", required = true)
    @NotNull
    private Integer pageNum;

    @ApiModelProperty(value = "每页大小", required = true)
    @NotNull
    private Integer pageSize;

    @ApiModelProperty("排序字段名")
    private String sortName;

    @ApiModelProperty(value = "排序方式 desc-倒序(默认) asc-正序", allowableValues = "desc,asc")
    private String sortOrder;

    @ApiModelProperty(value = "请求参数对象", required = true)
    private P param;

}
